package thread;

import java.util.Scanner;

public class SteepDemo {
    public static void main(String[] args) {
        /*
        System.out.println("程序开始了");
        long line = System.currentTimeMillis();
        try {
            Thread.sleep(6000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        long line1 = System.currentTimeMillis();
        System.out.println("程序结束了,耗时:"+(line1-line)+"ms");

         */
        System.out.println("程序开始了");
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个倒计时数字");
        int n =sc.nextInt();
        for (;n>0;n--){
            System.out.println(n);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }
        System.out.println("程序结束了");
    }
}
